package com.epoint.mobileoa.personalized.epointcompany.ui.kaoqing;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class KaoQingInfo implements Comparable<KaoQingInfo> {
	public String time;
	public String address;

	@Override
	public int compareTo(KaoQingInfo another) {
		Date aT = null;
		Date T = null;
		try {
			aT = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss")
					.parse(another.time);
			T = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss").parse(time);
		} catch (ParseException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		if (aT.before(T)) {
			return 1;
		} else if (aT.equals(T)) {
			return 0;
		} else {
			return -1;
		}

	}

}
